/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.frogs.manager;

import com.frogs.data.AbstractManager;
import com.frogs.exception.FrogsFindException;
import com.frogs.exception.FrogsMergeException;
import com.frogs.exception.FrogsPersistException;
import com.frogs.exception.FrogsRemoveException;
import com.frogs.model.Color;
import java.util.List;
import javax.persistence.EntityManager;

/**
 *
 * @author gabrielbran
 */
public class ManagerColor extends AbstractManager {

    public ManagerColor() {
        super();
    }

    public Color guardaColor(Color c) throws FrogsPersistException {
        return (Color) super.persistObject(c);
    }

    public Color actualizaColor(Color c) throws FrogsMergeException {
        return (Color) super.mergeObject(c);
    }

    public void eliminaColor(Color c) throws FrogsRemoveException  {
        super.removeObject(c);
    }

    public List<Color> getListaColores() throws FrogsFindException {
        return (List<Color>) super.getEntityList();
    }

    public Color buscarColor(Integer cpk) throws Exception {
        return (Color) super.findById(cpk);
    }

    @Override
    public EntityManager getEm() {
        return super.getEm();
    }

    @Override
    public String getEntityName() {
        return "Color";
    }
}
